#include "enemyplane.h"

enemyplane::enemyplane()
{
    m_enemy.load(":/res/enemy1.png");

    m_X=0;
    m_Y=0;

    m_Free=true;

    m_Speed=5;

    m_Rect.setWidth(m_enemy.width());
    m_Rect.setHeight(m_enemy.height());
    m_Rect.moveTo(m_X,m_Y);
}

void enemyplane::updatePosition()
{
    if(m_Free){
        return;
    }
    m_Y+=m_Speed;
    m_Rect.moveTo(m_X,m_Y);

    if(m_Y>=768+m_Rect.height()){
        m_Free=true;
    }
}
